package element.base;

public class Word extends BaseNode {
    private String content;
    private WordType type;

    public Word(String content, WordType type) {
        this.content = content;
        this.type = type;
    }

    public String getContent() {
        return content;
    }

    public WordType getType() {
        return type;
    }

    @Override
    public String toString() {
        return type.toString() + " " + content;
    }

    @Override
    public String toTreeString(int level) {
        String tstr = "";

        for (int i = 0; i < level; i++) {
            tstr += "\t";
        }

        tstr += type.toString() + " " + content;

        return tstr;
    }
}
